The invention relates to a print control apparatus and its print control method and, more particularly, to an error recovery system of a paper jam error or the like occurring in a shuttle printer or a page printer such as a laser printer, an LED (Light Emitting Diode) printer, an LCS (Liquid Crystal Shutter) printer, or the like.
Hitherto, an disclosed in JP-A-60-257262 (hereinafter, referred to as a first prior art), a printer has command buffers of the number as many as commands of the maximum number of sheets (hereinafter, simply referred to as a maximum holding number) which can be simultaneously print processed in the printer, in which each command buffer is used to hold a print command transmitted from a host computer until the completion of the paper discharge as a normal end of the printing process of the print command. When an error such as a paper jam or the like which needs the reprint occurs, causes of the error are eliminated and then the print command after the time point of the occurrence of the error is read out from the command buffer and the print is again executed and the error recovery is performed.
In JP-A-3-155974 (hereinafter, referred to as a second prior art), when an error such as a paper jam or the like occurs in a printer, the printer notifies the kind of error occurring in a host computer and the page in which such an error has occurred. The host computer which has received such a notification again transmits a print command after the page having the error to the printer for the error which needs the reprint, thereby enabling the printer to reprint the pages after the error occurring portion.
In JP-A-3-224778 (hereinafter, referred to as a third prior art), when an error such as paper jam or the like occurs in a printer, the printer notifies the kind of error which has occurred in a host computer, the host computer which has received such a notification again transmits the print command train after the head page constructing a document for the error which needs the reprint.
For such a retransmitted print command train, the printer executes the following processes with regard to the pages before the page having the error.
(1) When a command is determined to be a setting command of attribute parameters by a command interpretation, the command is executed, so that the attribute parameters are set into a table called an attribute parameter table. The attribute parameters include a paper size, a line pitch, a character pitch, a character kind, a character size, a line type, and the like.
(2) However, when the command is for drawing a character, a figure (straight line, arc, circle, polygon, or the like), an image, or the like, the command is not executed.
(3) The printing process about the page buffer is not activated as well.
With respect to the pages after the page in which the error has occurred, the printer executes both of the image drawing process and the printing process in the ordinary manner.
According to the above first prior art, for instance, in a laser printer having a printing speed of 20 sheets/min, the papers in a range from about ten to twenty sheets are substantially simultaneously concerned with the printing process, so that the maximum holding number lies within a range from about 10 to 20. A capacity of the print command per paper is equal to about two Mbytes in case of transmitting the image of one page of the A4 size as image data of a density of 400 dots/inch. Therefore, in this case, a memory of at least about 20 to 40 Mbytes is necessary as a special command buffer only for use of the error recovery mentioned above, so that there is a problem such that the costs remarkably increase. According to the first prior art, nothing is considered with respect to a point that the drawing attribute parameters are handed over between the pages. Therefore, even if the print command is preserved, in case of performing the error recovery using the preserved print command from the page having the error as a start page, the attribute parameters until the error occurring page are not handed over, so that there is also a problem such that the result of the reprint from the error occurring page cannot be printed as an original page by the attribute parameters before the occurrence of the error.
According to the second prior art, when the reprint is executed, the host computer again transmits the print command train after the error occurring page to the printer. However, even when the host computer again transmits the print command train after the error occurring page, the values of the attribute parameters which have been set and updated by the print command train before the error occurring page cannot be recognized by only the retransmitted print command train, so that there is a problem such that the inherent print by the attribute parameters before the error occurs cannot be performed.
According to the third prior art, with respect to the page before the error occurring page, the printer interprets the command as mentioned above and, in case of the setting command of the attribute parameters, the printer executes such a setting command and doesn""t execute the command to draw an image and the printing process. Such a processing method is hereinafter called a command read skipping process. Such a command read skipping process is a complicated process. That is, when a plurality of printer escape sequence commands which are peculiar to the respective companies and a plurality of page describing languages such as Post Script (registered trade name of Adobe Systems Co., Ltd.) and Interpress (registered trade name of Xerox Co., Ltd.) are supported as various kinds of drawing commands, it is necessary to execute such a read skipping process with respect to each of various kinds of drawing commands, so that there is a problem such that a development program amount increases.
The above problems are large subjects in, particularly, a print control apparatus which executes the drawing process and the printing process as a multi task construction in a concurrent or parallel manner.
It is an object of the invention to solve the above problems and to realize a printing apparatus and a print control method which can generate an accurate print result without executing a vain reprint even when an error such as a paper jam or the like which needs the reprint occurs in a printer as mentioned above, by a small memory capacity and simple processes.
To accomplish the above object, a print control apparatus according to the invention includes;
{circle around (1)} a communication control section which receives from a host computer a print command train having at least drawing commands which are arranged in accordance with the order of print pages and indicate drawing information such as characters, a figure, an image, etc. and an attribute parameter setting command which is arranged at an arbitrary position and indicates a format or the like to draw the image drawing information, as image data, regarding the drawing commands after the attribute parameter setting command;
{circle around (2)} a command buffer section for storing the received print command train;
{circle around (3)} a drawing processing section for sequentially reading the print command train from the command buffer section and executing a drawing process in accordance with the print command train in the normal state and for again sequentially reading out the print command train after the page which is not yet discharged at a time point of the occurrence of an abnormality and executing a drawing process in accordance with the print command train in an abnormality occurring state;
{circle around (4)} a page buffer section for storing dot image data drawn by the drawing processing section;
{circle around (5)} a print processing section for instructing the printer control section to print the dot image data stored in the page buffer section;
{circle around (6)} a printer control section for reading out the dot image data from the page buffer section and executing a print control to a printer engine section in accordance with an instruction from the print processing section;
{circle around (7)} an abnormality processing section for monitoring an abnormality of the printer engine section and for activating a reprinting process in the drawing processing section in the case where an abnormality which needs the reprint occurs; and
{circle around (8)} an attribute parameter table section for at least storing the attribute parameters set in accordance with the print command train read out in the drawing processing section until all of the pages regarding the attribute parameters are discharged,
wherein when the abnormality occurs, the drawing processing section executes the drawing process by the attribute parameters of the page to be again drawing processed which have been stored in the attribute parameter table section. The above method is hereinafter called a command buffer preserving method.
In the command buffer preserving method, for instance, when the drawing processing section detects a page changing condition in the drawing process, the drawing processing section activates the print processing section with respect to a page buffer whose drawing has been completed. The print processing section instructs the printer control section to execute the print with respect to the page buffer section. The printer engine section executes the print by the control of the printer control section. The abnormality monitoring section detects an error regarding the printer and newly activates the drawing processing section in case of an error such as a paper jam or the like which needs the reprint. The activated drawing processing section executes the interpretation and execution of the command of the page having the error in the command buffer section in accordance with the attribute parameters stored in the attribute parameter table section together with, for instance, the value of a read pointer indicative of the reading position from the command buffer. According to the command buffer preserving method, the accurate print result can be generated by preparing the command buffers of only a capacity (for instance, about 2 Mbytes in case of the A4 size and 100 dots/inch mentioned above) which is necessary when the capacity is largest for one paper.
According to the command buffer preserving method as described above, since the attribute parameters are stored and managed separately from the print command train, by merely preparing the command buffers by only the capacity which is necessary when the capacity is largest for one paper, the accurate print result can be generated at low costs because there is no need to prepare the special command buffers of the number only for the error recovery as many as the maximum holding number as in the first prior art. On the other hand, since the drawing attribute parameters at the start of the drawing of each page have been preserved in the command buffer discharge queue section, even for a command of the type such that the drawing attribute parameters are handed over between the pages, the print result doesn""t differ from the inherent print upon error recovery. The reliability and use efficiency of the print control apparatus can be improved.
To accomplish the above object, a print control apparatus according to the invention includes:
{circle around (1)} a communication control section which receives from a host computer a print command train indicative of drawing information such as characters, a figure, an image, or the like and attribute parameter setting information indicative of a format or the like to draw the drawing information as image data;
{circle around (2)} a command buffer section for storing the received print command train;
{circle around (3)} a drawing processing section for sequentially reading out the print command train from the command buffer section and executing a drawing process every page in accordance with the print command train;
{circle around (4)} a page buffer section for storing dot image data drawn by the drawing processing section until at least the print of the relevant page is finished;
{circle around (5)} a print processing section for instructing the printer control section to print with respect to the dot image data stored in the page buffer section;
{circle around (6)} a printer control section for reading out the dot image data from the page buffer section and executing a print control to a printer engine section in accordance with an instruction from the print processing section;
{circle around (7)} an abnormality processing section for monitoring an abnormality of the printer engine section and for activating a reprinting process of the printer control section when an abnormality which needs the reprint occurs; and
{circle around (8)} a page buffer number preserving section for preserving a page buffer number indicative of a memory position of a discharge waiting page in the page buffer,
wherein when the abnormality occurs, the printer control section reads out the dot image data of the page in which the abnormality has occurred from the page buffer number of the abnormality occurring page in the page buffer number preserving section and executes a print control of the printer engine section. This method is hereinafter called a page buffer preserving method.
According to the page buffer preserving method, for instance, when the drawing processing section detects a page changing condition in the drawing process, the drawing processing section activates the print processing section with respect to the page buffer in which the drawing has been completed and preserves the print page buffer number of the page as an object to be printed. The drawing processing section instructs the printer control section to print with respect to the relevant portion in the page buffer section. The printer engine section executes the print by the control of the printer control section. The abnormality monitoring section detects an error regarding the printer and, when it is determined that the detected error is such as a paper jam or the like which needs the reprint, the abnormality monitoring section executes a reprinting process of the page with the error in the page buffer by the page buffer number preserved. With respect to only the page in which the completion of the print has finally been confirmed, the image data is cleared to zero from the page buffer section.
According to the page buffer preserving method as mentioned above, since the buffer areas in which the paper discharge has been finished can be sequentially cleared, by preparing the page buffers of the number as many as only the capacity which is necessary when the capacity is largest for one paper whose print has been finished, there is no need to prepare the special command buffers of the number only for the error recovery as many as the maximum holding number as in the first prior art. Thus, the accurate print result can be generated at low costs. Since the drawing result itself has been preserved in the page buffer section, even for the command of the type such that the drawing attribute parameters are handed over between the pages, the print result doesn""t differ from the inherent print upon error recovery. The reliability and use efficiency of the print control apparatus can be improved.
To accomplish the above object, in addition to the command buffer preserving method, the print control apparatus according to the invention further comprises:
{circle around (1)} a secondary memory device for storing the print command train received from the command buffers as a plurality of command files in which the print commands of the respective pages have been described;
{circle around (2)} a command file preservation control section for controlling the writing and reading operations of the command files; and
{circle around (3)} a command file management table section for managing the memory positions of the command files in the secondary memory device,
wherein when the abnormality processing section activates the reprinting process of the drawing processing section, the command file preservation control section reads out the command files of the page which needs the reprint from the secondary memory device into the command buffers by recognizing the memory position by the command file management table section, and the drawing processing section executes the drawing process to reprint by the print command train newly stored in the command buffers. This method is hereinafter called a command file preserving method.
According to the command file preserving method, for instance, when the drawing processing section stores a predetermined amount of commands into the command work areas in the command buffer reading process, the contents are stored as command files into the secondary memory device. When the drawing section detects the page changing conditions, the drawing processing section stores the values of the present drawing attribute parameters as attribute files for the next page into the command file section and activates the printing process of the print processing section with respect to the page buffer in which the drawing has been completed. After the print processing section instructed the printer control section to print with regard to the page buffer section, the abnormality processing section detects the error about the printer and, when it is determined that the detected error is an error such as a paper jam or the like which needs the reprint, the drawing processing section is newly activated. The activated drawing processing section, for instance, copies the contents of the attribute parameter file for the first preservation page into the present attribute parameter table for the drawing process and stores the content of the preservation command file into the command buffer section and executes the interpretation and execution of the commands in the command buffer section in accordance with the attribute parameters in the present attribute parameter table.
According to the command file preserving method as mentioned above, the command buffer capacity can be further reduced that of the command buffer preserving method (the apparatus can operate even in case of at most one byte) and there is need to prepare the special command buffers of the number only for the error recovery as many as the maximum holding number as in the first prior art. On the other hand, since the drawing attribute parameters at the time of the start of the drawing of each page have been preserved in the attribute parameter file for each other, even for the command of the type such that the drawing attribute parameters are handed over between the pages, the print result doesn""t differ from the inherent upon error recovery. The reliability and use efficiency of the print control apparatus can be improved. In addition, by also using a plurality of kinds of error recovering modes, the error recovery of the high performance and high reliability can be also provided to the user in accordance with the use situation of the secondary memory device. Further, since the registration data such as fonts/external characters, formats, and the like has been commonly preserved with respect to a plurality of pages, the file capacity for preservation can be reduced. Therefore, the print control apparatus of a high cost performance can be realized.
According to the above command file preserving method, in place of the command with respect to each page, dot image data as a result of the drawing into the page buffers is preserved and the error can be also recovered by using the dot image data. This method is hereinafter called a drawing image file preserving method.
According to the drawing image file preserving method, in the page buffer preserving method, the dot image data as a result of the drawing of the page buffers is further preserved as files into the secondary memory device, so that the command buffer capacity can be further reduced.
In all of the above methods, it is possible to solve the problems such as increase in processing burden of the host computer, modification of the program, and the like in the second prior art. Further, since the command read skipping in the third prior art can be eliminated, an increase in program amount of the print control apparatus can be eliminated.